package com.example.activitytransitioneffect;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ToActivity extends Activity implements OnClickListener {
	Button dan_ru_dan_chu_001;
	Button gun_dong;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.to_activity_layout);

		dan_ru_dan_chu_001 = (Button) findViewById(R.id.up_down_001);
		dan_ru_dan_chu_001.setOnClickListener(this);
		gun_dong = (Button) findViewById(R.id.left_right_001);
		gun_dong.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		int vid = v.getId();
		switch (vid) {
		case R.id.up_down_001:
			this.finish();
			overridePendingTransition(R.anim.up_in, R.anim.down_out);
			break;
		case R.id.left_right_001:
			this.finish();
			overridePendingTransition(R.anim.left_in, R.anim.right_out);
			break;

		default:
			break;
		}
	}

}
